Learn R Programming

MuMIn (version 1.15.6)

Model utilities: Model utility functions

Description

These functions extract or calculate various values from provided fitted model objects(s). They are mainly meant for internal use.

coeffs extracts model coefficients;

getAllTerms extracts independent variable names from a model object;

coefTable extracts a table of coefficients, standard errors and associated degrees of freedom when possible;

get.response extracts response variable from fitted model object;

model.names generates shorthand (alpha)numeric names for one or several fitted models.

Usage

coeffs(model)

getAllTerms(x, ...) # S3 method for terms getAllTerms(x, offset = TRUE, intercept = FALSE, ...)

coefTable(model, ...) # S3 method for averaging coefTable(model, full = FALSE, adjust.se = TRUE, ...) # S3 method for lme coefTable(model, adjustSigma, ...) # S3 method for gee coefTable(model, ..., type = c("naive", "robust"))

get.response(x, ...)

model.names(object, ..., labels = NULL, use.letters = FALSE)

Arguments

model

a fitted model object.

object

a fitted model object or a list of such objects.

x

a fitted model object or a formula.

offset

should ‘offset’ terms be included?

intercept

should terms names include the intercept?

full, adjust.se

logical, apply to "averaging" objects. If full is TRUE, the full model averaged coefficients are returned, and subset-averaged ones otherwise. If adjust.se is TRUE, inflated standard errors are returned. See ‘Details’ in par.avg.

adjustSigma
type

for GEE models, the type of covariance estimator to calculate returned standard errors on. Either "naive" or "robust" (‘sandwich’).

labels

optionally, a character vector with names of all the terms, e.g. from a global model. model.names enumerates the model terms in order of their appearance in the list and in the models. Therefore changing the order of the models leads to different names. Providing labels prevents that.

for model.names, more fitted model objects. For coefTable arguments that are passed to appropriate vcov or summary method (e.g. dispersion parameter for glm may be used here). In other functions often not used.

use.letters

logical, whether letters should be used instead of numeric codes.

Details

The functions coeffs, getAllTerms and coefTable provide interface between the model object and model.avg (and dredge). Custom methods can be written to provide support for additional classes of models.